DevForce Help Reference
First<TResult>(IEntityScalarQuery<TResult>) Method
Example 


Returns the first element in the sequence.
Syntax
'Declaration
 
<ExtensionAttribute()>
Public Overloads Shared Function First(Of TResult)( _
   ByVal source As IEntityScalarQuery(Of TResult) _
) As Task(Of TResult)
'Usage
 
Dim source As IEntityScalarQuery(Of TResult)
Dim value As Task(Of TResult)
 
value = EntityScalarAsyncExtensions.First(Of TResult)(source)

Parameters

source

Type Parameters

TResult
Example
public async void AsyncFirst() {
  Employee emp = await  _entityManager.Employees.AsScalarAsync().First();
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

EntityScalarAsyncExtensions Class
EntityScalarAsyncExtensions Members
Overload List

Send Feedback